﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="Test_Gridview.aspx.cs" Inherits="QuanLyDiemHocSinh.Test_Gridview" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .auto-style3 {
            width: 59px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4" DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="TenMonHoc" HeaderText="TenMonHoc" SortExpression="TenMonHoc" />
            <asp:BoundField DataField="HeSo" HeaderText="HeSo" SortExpression="HeSo" />
            <asp:BoundField DataField="MaLoaiDiem" HeaderText="MaLoaiDiem" SortExpression="MaLoaiDiem" />
            <asp:BoundField DataField="Diem" HeaderText="Diem" SortExpression="Diem" />
        </Columns>
        <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
        <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
        <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
        <RowStyle BackColor="White" ForeColor="#003399" />
        <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
        <SortedAscendingCellStyle BackColor="#EDF6F6" />
        <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
        <SortedDescendingCellStyle BackColor="#D6DFDF" />
        <SortedDescendingHeaderStyle BackColor="#002876" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:QuanLyDiemConnectionString %>" SelectCommand="Select MonHoc.TenMonHoc,MonHoc.HeSo,BangDiemCon.MaLoaiDiem,BangDiemCon.Diem from MonHoc,BangDiemCon where MonHoc.MaMonHoc=BangDiemCon.MaMonHoc order by MonHoc.TenMonHoc,BangDiemCon.MaLoaiDiem
"></asp:SqlDataSource>
    <asp:Button ID="Print" runat="server" Text="Button" />
    <br />
    <table border="1" cellpadding="4" cellspacing="0" rules="all" style="width:auto;border-collapse:collapse;">
                                <tr style="color:White;background-color:#507CD1;font-family:Times New Roman,Arial,Tahoma;font-weight:bold;">
                                    <th align="center" scope="col" style="border:solid 1px black">Môn học</th>
                                    <th align="center" scope="col" style="border:solid 1px black">Điểm</th>
                                </tr>
                                <asp:Repeater ID="rpt_BangDiem" runat="server">
                                    <ItemTemplate>
                                        <tr style="background-color:#EFF3FB;font-family:Times New Roman,Arial,Tahoma;">
         
                                            <td align="left" style="color:Blue;font-weight:bold;border:solid 1px black"><%# DataBinder.Eval(Container, "DataItem.TenMonHoc") %></td>
                                            <td align="left" style="color:Blue;font-weight:bold;border:solid 1px black"><%# DataBinder.Eval(Container, "DataItem.Diem") %></td>             
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </table>
</asp:Content>

